package com.antler.smt.service.portal;

import com.antler.smt.entity.OrderEntity;
import com.antler.smt.entity.SupplierEntity;
import com.antler.smt.enums.ResultCodeEnum;
import com.antler.smt.request.admin.GetSupplierListReq;
import com.antler.smt.request.portal.MemberReq;
import com.antler.smt.request.portal.OrderLogisticsReq;
import com.antler.smt.request.portal.SupplierPersonReq;
import com.antler.smt.response.admin.GetOrderListResp;
import com.antler.smt.response.admin.GetSupplierListResp;
import com.antler.smt.response.base.Result;
import com.github.pagehelper.Page;

/**
 * 门户服务商接口
 *
 * @author zhangyi
 * @date 2018/4/10 9:16
 */
public interface SupplierService {

    /**
     *  优质加工厂申请
     *
     * @return
     */
    Result<ResultCodeEnum> excellent(Long id);

    /**
     * 获取本次订单下的服务商
     *
     * @param orderEntity
     * @return
     */
    Result<SupplierEntity> getSupplierInfo(OrderEntity orderEntity);

    /**
     * 获取当前的服务商
     *
     * @param memberId
     * @return
     */
    Result<GetSupplierListResp> getSupplier(long memberId);

    /**
     * 获取其当前服务下的订单列表
     *
     * @param memberId
     * @return
     */
    Result<GetOrderListResp> getSupplierOrderList(long memberId);

    /**
     *  服务商入驻
     *
     * @param request
     * @return
     */
    Result<ResultCodeEnum> updateSupplierSettled(GetSupplierListReq request, Long memberId, String code);

    /**
     *  获取订单数量
     *
     * @param id
     * @return
     */
    Result<Integer> excellentConunt(Long id);

    /**
     *  更新订单的发货状态
     *
     * @param orderId
     * @param req
     * @return
     */
    Result<ResultCodeEnum> sendGoods(Long orderId, OrderLogisticsReq req);

    /**
     *  更改服务商的个人信息
     *
     * @param supplierPersonReq
     * @return
     */
    Result<ResultCodeEnum> editMemberSupplierInfo(SupplierPersonReq supplierPersonReq,Long memberId);

    /**
     * 条件查询优质加工厂
     *
     * @param request
     * @return
     */
    Result<GetSupplierListResp> selectExcellentSupplier(GetSupplierListReq request);

    /**
     * 根据昵称查询优质加工厂信息
     *
     * @param memberReq
     * @return
     */
    Result<GetSupplierListResp> selectExcellentSupplierByNickName(MemberReq memberReq);

    /**
     * 返回服务商入驻实体信息
     *
     * @param memberId 会员id
     * @return
     */
    Result getSupplierSettedInfo(Long memberId);
}
